package com.platform.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.platform.utils.KdniaoUtils;
import com.platform.utils.KuaiDiUtils;
import org.springframework.stereotype.Service;

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ApiKdniaoService {

    //DEMO
    public static void main(String[] args) {
        ApiKdniaoService api = new ApiKdniaoService();
        try {
            List result = api.getOrderTracesByJson("SF", "446901192611");
            System.out.print(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * Json方式 查询订单物流轨迹
     *
     * @throws Exception
     */
    public List getOrderTracesByJson(String expCode, String expNo) {
        return KuaiDiUtils.getOrderTracesByJson(expCode, expNo);
    }

}
